package com.xinqi.modules.course.clazz.service;

import com.xinqi.common.base.response.PageInfo;
import com.xinqi.common.base.response.Param;
import com.xinqi.modules.course.clazz.domain.ClassOperationLogEntity;
import com.xinqi.modules.course.clazz.dto.req.ClassOperationLogCreateDTO;
import com.xinqi.modules.course.clazz.dto.req.ClassOperationLogDeleteDTO;
import com.xinqi.modules.course.clazz.dto.req.ClassOperationLogQueryDTO;
import com.xinqi.modules.course.clazz.dto.req.ClassOperationLogUpdateDTO;
import com.xinqi.modules.course.clazz.dto.rsp.ClassOperationLogResultDTO;
import com.xinqi.modules.course.course.enums.clazz.ClassOperationLogTypeEnum;

import java.util.List;

/**
 * 班级日志服务层
 *
 * @author: system
 * @date: 2023/01/17
 */
public interface ClassOperationLogService {
    /**
     * 分页查询 班级日志数据
     */
    PageInfo<ClassOperationLogResultDTO> page(Param pageable, ClassOperationLogQueryDTO query);

    /**
     * 查询 班级日志数据
     */
    List<ClassOperationLogResultDTO> find(ClassOperationLogQueryDTO query);

    /**
     * 根据id查询 班级日志数据
     */
    ClassOperationLogResultDTO findById(Long id);

    /**
     * 新增 班级日志数据
     */
    Long insert(ClassOperationLogCreateDTO dto);

    /**
     * 根据id修改 班级日志数据
     */
    Boolean updateById(ClassOperationLogUpdateDTO dto);

    /**
     * 根据id删除 班级日志数据
     */
    Boolean deleteById(Long id);

    /**
     * 根据id删除 班级日志数据
     */
    Boolean deleteById(ClassOperationLogDeleteDTO dto);

    /**
     * 学生进入班级操作日志
     *
     * @param courseId         课程id
     * @param classId          班级id
     * @param studentId        学生id
     * @param auditId          审核id
     * @param operationLogType 加入方式
     * @return
     */
    Boolean insertStudentOperateLog(Long courseId, Long classId, Long studentId, Long auditId, ClassOperationLogTypeEnum operationLogType);

    Boolean batchInsertStudentOperateLog(Long courseId, Long classId, List<Long> studentIdList, Long auditId, ClassOperationLogTypeEnum operationLogType);

    Boolean batchSave(List<ClassOperationLogEntity> logList);

}
